import request from "../utils/request";
import type { AdminLoginVO, AdminIdTto, DataGrid, AdminListInfo } from "../type";


export function login(data: AdminLoginVO, code: string): Promise<AdminIdTto> {
    return request({
        url: `/admin/login?code=${code}`,
        data
    })
}

export function adminList(current: number, size: number): Promise<DataGrid<AdminListInfo>> {
    return request({
        url: `/admin/list/${current}/${size}`
    })
}

export function changePassword(data: any): Promise<any> {
    console.log(data);
    return request({
        url: `/admin/pwd`,
        data: data
    })
}